package com.scalar.chiptrack.operations.discrepancyLotsNotifications.actionCommands;

import com.scalar.chiptrack.ChipTrackExtendedAction;
import com.scalar.chiptrack.commons.Constants;

/**
 * Created by IntelliJ IDEA.
 * User: Murali Krishna Yengala
 * Date: Sep 12, 2005
 * Time: 3:16:38 PM
 */

public class DiscripancyLotsNotificationsActionCommandFactory {
    private static DiscripancyLotsNotificationsActionCommandFactory ourInstance = new DiscripancyLotsNotificationsActionCommandFactory();

    public static DiscripancyLotsNotificationsActionCommandFactory getInstance() {
        return ourInstance;
    }

    private DiscripancyLotsNotificationsActionCommandFactory() {
    }

    public static ChipTrackExtendedAction getActionCommand( String action)
    {
        if( Constants.ACTION_DELTE.equalsIgnoreCase( action ))
        {
            return new DeleteDiscrepancyLotsCommand();
        }
        if( Constants.ACTION_CONFIRM.equalsIgnoreCase( action ))
        {
            return new ConfirmDeleteDiscrepancyLotsCommand();
        }
        return null;
    }
}
